import { getUserInfo } from '../../api/user'
export default {
  namespaced: true,
  state: {
    userInfo: {}
  },
  mutations: {
    SET_USER_INFO(state, payload) {
      state.userInfo = payload
    }
  },
  actions: {
    getUserInfo({ commit }) {
      getUserInfo().then((res) => {
        commit('SET_USER_INFO', res)
      })
    }
  }
}
